package dragon

/*
import (
    "bytes"
    "http"
    "image"
    "image/jpeg"
	"template"
	"time"

	"appengine"
	"appengine/datastore"
)

type person struct {
    Fname   string
    Lname   string
    Function    string
    Group   string
	Date    datastore.Time
}

func handleSquad(w http.ResponseWriter, r *http.Request) {
	c := appengine.NewContext(r)

    const lenPath = len(guestbookURL)
    var err os.Error
    var offset int

    offset, _ = strconv.Atoi(r.URL.Path[lenPath:])
	q := datastore.NewQuery("entry").Order("-Date").Offset(offset).Limit(5)
	var ee []*entry
	_, err = q.GetAll(c, &ee)
    checkRdr(err, "/static/err.html", w, r)
	w.Header().Set("Content-Type", "text/html; charset=utf-8")
    
    ts := new(template.Set)
    troot, err := template.New("root").ParseFile("templates/root.html")
    checkRdr(err, "/static/err.html", w, r)
    tguestbook, err := template.New("content").ParseFile("templates/guestbook.html")
    checkRdr(err, "/static/err.html", w, r)
    tsign, err := template.New("sign").ParseFile("templates/guestbook-sign.html")
    checkRdr(err, "/static/err.html", w, r)
    ts.Add(troot, tguestbook, tsign)
    ts.Execute(w, "root", ee)
}

func handleSquadUpload(w http.ResponseWriter, r *http.Request) {
	if r.Method != "POST" {
	    http.Redirect(w, r, "/static/err.html", http.StatusFound)
		return
	}

    f, _, err := r.FormFile("mug")
    check(err)
    defer f.Close()

    var buf bytes.Buffer

	c := appengine.NewContext(r)
	err := r.ParseForm()
    checkRdr(err, "/static/err.html", w, r)
	e := &entry{
        Nick:    r.FormValue("nick"),
		Content: r.FormValue("content"),
		Date:    datastore.SecondsToTime(time.Seconds()),
	}
	_, err = datastore.Put(c, datastore.NewIncompleteKey(c, "entry", nil), e)
    checkRdr(err, "/static/err.html", w, r)
	http.Redirect(w, r, "/guestbook", http.StatusFound)
}
*/
